package com.chixing.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chixing.entity.BusinessOutlets;
import com.chixing.mapper.BusinessOutletsMapper;
import com.chixing.service.IBusinessOutletsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author shy
 * @since 2022-10-31
 */
@Service
public class BusinessOutletsServiceImpl extends ServiceImpl<BusinessOutletsMapper, BusinessOutlets> implements IBusinessOutletsService {
    @Autowired
    private BusinessOutletsMapper businessOutletsMapper;

    @Override
    public BusinessOutlets getBusinessOutletByName(String name) {
        QueryWrapper<BusinessOutlets> qw = new QueryWrapper<>();
        qw.eq("outlets_name",name);

        return businessOutletsMapper.selectOne(qw);
    }

    @Override
    public BusinessOutlets getBusinessOutletById(Integer outletId) {

        return businessOutletsMapper.selectById(outletId);
    }
}
